A
function is a database object that contains a block of code that can be
referenced in a command to return either a single value, in which case
it is called a scalar function, or a set of data, in which case it is
called a rowset function. For example, calling the GETDATE() scalar function will return the current date.
SQL Server offers many
built-in functions that can be used for aggregation, mathematical
calculations, date and time handling, text and string handling and the
execution of security tasks. In the interest of securing sensitive
data, we will be focusing on those functions that address cryptographic
functionality, which are:
AsymKey_ID
Cert_ID
CertProperty
DecryptByKeyAutoAsymKey
DecryptByKeyAutoCert
EncryptByAsymKey and DecryptByAsymKey
EncryptByCert and DecryptByCert
EncryptByKey and DecryptByKey
EncryptByPassPhrase and DecryptByPassPhrase
Key_ID
Key_GUID
SignByAsymKey
SignByCert
VerifySignedByAsymKey
VerifySignedByCert